import React, { useState } from 'react';
import Counter1 from "./Count1";
import CountContext from './CountContext'

function Example3() {
  const [count, setCount] = useState(0);
  const [test, setTest] = useState({test:666});
  return (
    <div>
      <p>You clicked {count} times</p>
      <button onClick={() => { setCount(count + 1) }}>click me</button>
      <CountContext.Provider value={test}>
        <Counter1></Counter1>
      </CountContext.Provider>
    </div>
  )
}
export default Example3;